<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<jsp:include page="/WEB-INF/templateFrontoffice/header.jsp"/>
<script src="<c:url value='/javascript/jquery.tablesorter.js'/>"></script>
<!-- <script src="<c:url value='/javascript/jquery.tablesorter.custom.js'/>"></script> -->
<script>
	$(document).ready(function(){$("#myTable").tablesorter({sortList:[[0,1]]});});
</script>
  <div id="container">
    <div id="top">
      <span id="arianne">
          <a href="<c:url value='/'/>">Accueil</a> > 
          <a href="<c:url value='/mesactions'/>">Mes actions</a>
      </span>
      <br/>
      <div id="mainlarge">
        <h2>Liste des mes actions </h2>
        <p class="error">${error}</p>


        <table id="myTable" class="CSSTableGenerator a_black format_listeTransaction">
            <thead>
                <tr>
                    <th>
                        ID Contrat 
                        <img class="up" src="<c:url value='/images/arrow_up.png'/>" alt="up"/>
                        <img class="down" src="<c:url value='/images/arrow_down.png'/>" alt="down"/>
                    </th>
                    <th>
                        Société 
                        <img class="up" src="<c:url value='/images/arrow_up.png'/>" alt="up"/>
                        <img class="down" src="<c:url value='/images/arrow_down.png'/>" alt="down"/>
                    </th>
                    <th>
                        Type
                        <img class="up" src="<c:url value='/images/arrow_up.png'/>" alt="up"/>
                        <img class="down" src="<c:url value='/images/arrow_down.png'/>" alt="down"/>
                    </th> 
                    <th>
                        Vendre
                    </th>
                </tr>
            </thead>
            <tbody>
                <c:forEach var="action" items="${actions}" varStatus="status">
                <tr>
                    <td style="text-align: right;"><c:out value="${action.idContrat}"/></td>
                    <td><c:out value="${action.entrepriseOrigine.nom }"/></td>
                    <td style="text-align: left;">Action</td>
                    <td style="text-align: center;">
                    	<a href="<c:url value='/action/vendre?idcontrat=${action.idContrat}'/>">
                    		<img src="<c:url value ='/images/dollar-24.png'/>" alt="vendre"/>
                    	</a>
                    </td>
                </tr>
                </c:forEach>
                
                <c:forEach var="option" items="${options}" varStatus="status">
                <tr>
                    <td style="text-align: right;"><c:out value="${option.idContrat}"/></td>
                    <td><c:out value="${option.entrepriseOrigine.nom }"/></td>
                    <td style="text-align: left;">Option</td>
                    <td style="text-align: center;">
                    	<a href="<c:url value='/action/vendre?idcontrat=${option.idContrat}'/>">
                    		<img src="<c:url value ='/images/dollar-24.png'/>" alt="vendre"/>
                    	</a>
                    </td>
                </tr>
                </c:forEach>
            </tbody>
        </table>
        <br/>
      </div>
    <!--end bottom-->
  </div>
  </div>
<jsp:include page="/WEB-INF/templateFrontoffice/footer.jsp"/>